use day10::{area::*, pipe::{Pipe, Position}};

#[test]
fn test_str_to_area() {
    let contens = ".....\n.S-7.\n.|.|.\n.L-J.\n.....";
    let area: Area = contens.into();
    assert_eq!(
        area,
        Area::new(
            vec![
                vec![Pipe::Ground, Pipe::Ground, Pipe::Ground, Pipe::Ground, Pipe::Ground],
                vec![Pipe::Ground, Pipe::SouthEast, Pipe::Horizontal, Pipe::SouthWest, Pipe::Ground],
                vec![Pipe::Ground, Pipe::Vertical, Pipe::Ground, Pipe::Vertical, Pipe::Ground],
                vec![Pipe::Ground, Pipe::NorthEast, Pipe::Horizontal, Pipe::NorthWest, Pipe::Ground],
                vec![Pipe::Ground, Pipe::Ground, Pipe::Ground, Pipe::Ground, Pipe::Ground],
            ],
            Position::new(1, 1),
            5,
            5,
        )
    );
}